﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Core.Entities
{
    /// <summary>
    /// 命令的缓存信息
    /// </summary>
    internal class CommandCacheInfo
    {
        /// <summary>
        /// 缓存使用次数
        /// </summary>
        public int UseCount;

        /// <summary>
        /// 上一次使用时间
        /// </summary>
        public DateTime LastUseTime;

        /// <summary>
        /// 缓存辅助变量，内存缓存则为 TableReadWriter 类型， 磁盘缓存为 string 类型的 Path。
        /// </summary>
        public object CacheTag;

        /// <summary>
        /// 缓存保存的时间。
        /// </summary>
        public DateTime SaveTime;

        /// <summary>
        /// 初始化缓存信息
        /// </summary>
        /// <param name="CacheTag">缓存辅助变量</param>
        public CommandCacheInfo(object CacheTag)
        {
            this.CacheTag = CacheTag;

            SaveTime = DateTime.Now;
        }
    }
}
